package com.koron.operation.classes.schedule.bean.po;

import com.koron.bean.annocation.FillField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.Objects;

/**
 * 值班人员(ClassesStaff)表实体类
 *
 * @author jzp
 * @since 2021-10-20
 */
@Data
@ApiModel(value = "值班人员", description = "ClassesStaff")
public class ClassesStaff {

    @FillField
    @ApiModelProperty(value = "唯一id")
    private String id;

    /**
     * 排班方案id
     */
    @ApiModelProperty("排班方案id")
    private String scheduleId;

    /**
     * 班次id
     */
    @ApiModelProperty("班次id")
    private String shiftId;

    /**
     * 职位类型，数据字典：operation_duty_type
     */
    @ApiModelProperty("职位类型，数据字典：operation_duty_type")
    private String type;

    /**
     * 人员账号
     */
    @ApiModelProperty("人员账号")
    private String staffBy;

    /**
     * 人员姓名
     */
    @ApiModelProperty("人员姓名")
    private String staffName;

    /**
     * 是否已签名，0false 1true
     * 每次接班清空这个值
     */
    @ApiModelProperty("是否已签名")
    private Integer signed;

    @FillField
    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        ClassesStaff that = (ClassesStaff) o;
        return staffBy.equals(that.staffBy);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), staffBy);
    }
}
